package weifei.mall.entity;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import org.springframework.stereotype.Repository;


/**
 *
 * -- 商品 规格封面 表
 * CREATE TABLE goods_specification_cover
 * (
 *     id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
 *     goods_id BIGINT UNSIGNED NOT NULL COMMENT "goods ID",
 *     content MEDIUMBLOB NOT NULL COMMENT "goods 规格封面",
 *     PRIMARY KEY (id),
 *     FOREIGN KEY (goods_id) REFERENCES goods(id)
 * );
 *
 * */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("goods_specification_cover")
@Repository
public class GoodsSpecificationCover extends Model<GoodsSpecificationCover>
{
    @Getter
    public enum Column
    {
        ID("id"),
        GoodsID("goods_id"),
        Content("content");

        final String name;
        Column(String name) { this.name = name; }
    }


    @TableId
    private Integer id;
    private Integer goodsId;
    private byte[] content;

    public GoodsSpecificationCover() {}
    public GoodsSpecificationCover(int id) {}
}



